'The following code up to where I say it isn't is all generated by
'VB Shaped Form Creator to produce the shaped form.
Option Explicit
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Long
Private Declare Function CreateRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal x1 As Long, ByVal y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Type POINTAPI
X As Long
Y As Long
End Type
Private Const RGN_AND = 1
Private Const RGN_COPY = 5
Private Const RGN_DIFF = 4
Private Const RGN_OR = 2
Private Const RGN_XOR = 3
Private Function CreateFormRegion() As Long
Dim ResultRegion As Long, HolderRegion As Long, ObjectRegion As Long, nRet As Long
Dim PolyPoints() As POINTAPI
ResultRegion = CreateRectRgn(0, 0, 0, 0)
HolderRegion = CreateRectRgn(0, 0, 0, 0)
'This procedure was generated by VB Shaped Form Creator. This copy has
'NOT been registered for commercial use. It may only be used for non-
'profit making programs. If you intend to sell your program, I think
'it's only fair you pay for mine. Commercial registration costs $20,
'and can be performed online. See "Registration" item on the help menu
'for details.
'Latest versions of VB Shaped Form Creator can be found at my website at
'http://www.comports.com/AlexV/VBSFC.html or you can visit my main site
'with many other free programs and utilities at http://www.comports.com/AlexV
'Lines starting with '! are required for reading the form shape using the
'Import Form command in VB Shaped Form Creator, but are not necessary for